// @APIVersion 1.0.0
// @Title beego Test API
// @Description beego has a very cool tools to autogenerate documents for your API
// @Contact astaxie@gmail.com
// @TermsOfServiceUrl http://beego.me/
// @License Apache 2.0
// @LicenseUrl http://www.apache.org/licenses/LICENSE-2.0.html
package routers

import (
	"advertoper/banner_manage/bcontrollers"
	"advertoper/controllers"
	"advertoper/homepageinfo/hcontroller"

	"github.com/astaxie/beego"
)

func init() {
	//beego.Router("/", &controllers.DefaultController{})
	//beego.Router("/*", &controllers.DefaultController{})
	beego.Router("/advertoper/get", &controllers.AdOpController{}, "post:GetAdverOper")

	beego.Router("/servicepage/get", &controllers.ServicePageController{}, "get:GetServicePageInfo")

	beego.Router("/servicepage/add", &controllers.ServicePageInfoMgrController{}, "post:CreateServicePageInfo")

	beego.Router("/servicepage/list", &controllers.ServicePageInfoMgrController{}, "post:GetServicePageInfoList")

	beego.Router("/servicepage/delete", &controllers.ServicePageInfoMgrController{}, "post:DeleteServicePageInfo")

	beego.Router("/hotactivity/get", &controllers.HotActivityController{}, "get:GetHotActivityInfo")

	beego.Router("/hotactivity/list", &controllers.HotActivityInfoMgrController{}, "post:GetHotActivityInfoList")

	beego.Router("/hotactivity/create", &controllers.HotActivityInfoMgrController{}, "post:CreateHotActivityInfo")

	beego.Router("/hotactivity/modify", &controllers.HotActivityInfoMgrController{}, "post:ModifyHotActivityInfo")

	beego.Router("/hotactivity/delete", &controllers.HotActivityInfoMgrController{}, "post:DeleteHotActivityInfo")

	//时间核对
	beego.Router("/client/time/check", &controllers.CheckNowTimeController{}, "get:CheckTime")

	fvns := beego.NewNamespace("/filmvideo",
		beego.NSNamespace("/program",
			beego.NSInclude(&controllers.FilmVideoClientController{}),
		),
		beego.NSNamespace("/mgr/program",
			beego.NSInclude(&controllers.FilmVideoAdminController{}),
		),
	)
	beego.AddNamespace(fvns)

	//大改版动态首页配置(包括服务的维修安装清洗)
	homepage := beego.NewNamespace("/homepage",
		beego.NSNamespace("web",
			beego.NSInclude(&hcontroller.AdminManageController{}),
			beego.NSInclude(&hcontroller.ZJBannerInfoController{}),
			beego.NSInclude(&hcontroller.ZJNewsInfoController{}),
			beego.NSInclude(&hcontroller.ZJMultiviewInfoController{}),
			beego.NSInclude(&hcontroller.ZJSingleViewInfoController{}),
			beego.NSInclude(&hcontroller.ZJTopicInfoController{}),
			beego.NSInclude(&hcontroller.ZJGoodsListInfoController{}),
			beego.NSInclude(&hcontroller.ZJSeckillInfoController{}),
			beego.NSInclude(&hcontroller.ZJPictureInfoController{}),
			beego.NSInclude(&hcontroller.ZJPageViewInfoController{}),
		),
		beego.NSNamespace("v1",
			beego.NSInclude(&hcontroller.UserInfoController{}),
			//客户端查询实时商品价格
			beego.NSInclude(&hcontroller.GoodsNowPriceQuery{}),
			//查服务页中数据
			beego.NSInclude(&hcontroller.ServiceUserController{}),
		),
		beego.NSNamespace("client",
			beego.NSInclude(&hcontroller.ZJSeckillUserController{}),
		),
		beego.NSNamespace("back",
			//上报商品销售数目+1
			beego.NSInclude(&hcontroller.GoodsSellNumUp{}),
			//上报秒杀销售数目,印证秒杀信息
			beego.NSInclude(&hcontroller.SeckillDataController{}),
		),
	)
	beego.AddNamespace(homepage)

	//路由表获取
	beego.Router("/router/table/get", &hcontroller.RouterTableController{}, "get:GetRouterTable")
	//客户端在线参数获取
	beego.Router("/get/online/parameters", &hcontroller.RouterTableController{}, "get:GetOnLineParameters")

	//临时账号
	t_passport := beego.NewNamespace("/passport",
		beego.NSNamespace("v1",
			beego.NSInclude(&hcontroller.TemporaryPassortController{}),
		),
	)
	beego.AddNamespace(t_passport)

	//banner运营位
	banner := beego.NewNamespace("/banner",
		beego.NSNamespace("admin",
			beego.NSInclude(&bcontrollers.BannerDataController{}),
		),
		beego.NSNamespace("v1",
			beego.NSInclude(&bcontrollers.BannerUserController{}),
		),
	)
	beego.AddNamespace(banner)

	aadmin := beego.NewNamespace("/advertoper",
		beego.NSNamespace("admin",
			beego.NSInclude(&controllers.AdvertoperAdminController{}),
		),
	)
	beego.AddNamespace(aadmin)
}
